package dao;

import dao.imp.IStatisticsDao;
import entity.Rewards;
import entity.Statistics;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import util.MysqlConnUtil;

import java.util.List;
import java.util.Map;

/**
 * @program: personnel_management_system
 * @description: statistics dao
 * @author: Mr.Sun
 * @create: 2020-05-29 22:52
 **/

public class StatisticsDao implements IStatisticsDao {

    @Override
    public Map select() throws Exception {
        JdbcTemplate template = new JdbcTemplate(MysqlConnUtil.getDataSource());
        String sql = "select * from statistics";
//        template.queryForMap(sql);
//        System.out.println(template.queryForMap(sql));
        Map<String,Object> map = template.queryForMap(sql);
        return map;
    }
}
